<?php 
error_reporting(0);
$isadmin=1;
include "../comm/config.php";
include "check.php";

if($_POST){
    $sql="update ".$BIAOTOU."websetting set spider='".trim($_POST['spider'])."',ban_spider_open='".$_POST['ban_spider_open']."'";
	mysql_query($sql);
	admin_log('设置限制蜘蛛');
	echo "<script>alert('设置完成');location.href='ban_spider.php'</script>";
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<script language="javascript" type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript"> 
function insertText(id, text){
	var contents = $('#'+id).val();
	if(contents) text = ","+text;
	$('#'+id).focus();
	$('#'+id).val(contents + text);
}
</script>
<link href="css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
table,tr,td { font-size:12px;}
table a { text-decoration:none; color:#FF6600}
table a:visted { color:#FF66CC; text-decoration:none}
.red {color: #FF3300}
.onFocus u{ cursor:pointer; font-size:14px}
-->
</style>
</head>
<body topmargin="5" leftmargin="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="282" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
          <table cellspacing="0" width="100%" height="207" style="border:1px  solid #DCEAF7;">
            <tr>
              <td height="30" colspan="2" bgcolor="E9F2FB" class="bigtext"><strong>&nbsp;<img src="images/arrow.gif" width="16" height="22" align="absmiddle" /> 温馨提示：如不了解此功能请不要开启, 否则会影响搜索引擎收录!</strong></td>
            </tr>
            <tr>
              <td width="100%" colspan="2" valign="top"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top">
                  <form name="myform" action="" method="post" id="myform">
<table width="100%"  class="table_form">
 
<tr>
<th></th>
<td>屏蔽蜘蛛访问：
	<input name="ban_spider_open" id="ban1" value="1" type="radio" <?php if(BANSPIDEROPEN==1){?> checked="checked" <?php }?>><label for="ban1">&nbsp;开启&nbsp;</label>&nbsp;
	<input name="ban_spider_open" id="ban0" value="0" type="radio" <?php if(BANSPIDEROPEN==0){?> checked="checked" <?php }?>><label for="ban0">&nbsp;关闭&nbsp;</label>&nbsp;
	<span class="onFocus">选择关闭则不屏蔽以下蜘蛛</span>
</td>
</tr>
 
<tr>
<th width="150">填写屏蔽的蜘蛛名称<br>用“,”符号隔开<br><br></th>
<td><input type="text" name="spider" id="spider" style=" width:500px" value="<?=SPIDER=='SPIDER'?'':SPIDER?>" /></td>
</tr>
 
<tr>
<th></th>
<td>
	<span class="onFocus">
	<font class="red">常见蜘蛛(点击添加):</font>
	<u class="cu" onClick="insertText('spider', 'baiduspider')" title="baiduspider">百度</u> |
	<u class="cu" onClick="insertText('spider', 'googlebot')" title="googlebot">谷歌</u> |
	<u class="cu" onClick="insertText('spider', 'sogou')" title="sogou">搜狗</u> |
	<u class="cu" onClick="insertText('spider', 'sosospider')" title="sosospider">腾讯SOSO</u> |
	<u class="cu" onClick="insertText('spider', 'slurp')" title="slurp">雅虎</u> |
	<u class="cu" onClick="insertText('spider', 'youdaobot')" title="youdaobot">有道</u> |
	<u class="cu" onClick="insertText('spider', 'bingbot')" title="bingbot">Bing</u> |
	<u class="cu" onClick="insertText('spider', 'msnbot')" title="msnbot">MSN</u> |
	<u class="cu" onClick="insertText('spider', 'ia_archiver')" title="ia_archiver">Alexa</u>
	</span>
</td>
</tr>
 
 
<tr>
<th></th>
<td>
	<input type="submit" value="提交" class="button" style="width:70px" />&nbsp;
	<input type="button" value="重置" class="button" style="width:70px" onclick="$('#spider').val('');$('#ban0').attr('checked',true);" />
</td>
</tr>
 
</table>
</form>
                  </td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      
    </table></td>
  </tr>
</table>
</body>
</html>
<?php mysql_close($link);?>
